<template>

    <div>
        
        <el-button @click="test1(0)" >微信</el-button>
        <el-button @click="test1(1)" >钉钉</el-button>

    </div>


</template>


<script setup>
import { ref,onMounted } from 'vue'
import http from '../http'
import { useRouter } from 'vue-router';

const test = ref('')
const router = useRouter()



const test1 = (data) => {
    localStorage.setItem('type', data)
    console.log(data)
    http.get('app/sflogin/', { params: { 'type': data } }).then(res => {
        console.log(res)
        test.value = res.data.url
        
        window.location.href = test.value
        

    })

}



onMounted(() => {
    
})

</script>